import 'package:flutter/material.dart';

void main(){
  runApp(const MyApp());
}
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primaryColor:Colors.red,
      ),
      home: Scaffold(
        appBar: AppBar(
          title:const Text("Flutter ListView"),
        ),
        body: const MyHomePage(),
      ),
    );
  }
}
class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return ListView(
      children: <Widget> [
        // Container(
        //   decoration:const BoxDecoration(
        //     color: Colors.blueGrey,
        //   ),
        //   child: ListView(
        //     scrollDirection: Axis.horizontal ,
        //     children: <Widget>[
        //       Container(
        //         alignment: Alignment.centerLeft,
        //         decoration: const BoxDecoration(
        //           color: Colors.red,
        //         ),
        //         // width: 150,
        //         height: 150,
        //         child: Column(
        //           children: [
        //             Image.network("https://img1.baidu.com/it/u=513832603,1967830508&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1371",
        //               fit: BoxFit.cover,
        //               height: 100,
        //             ),
        //             const Text("标题1",
        //               style: TextStyle(
        //                 fontSize: 20,
        //                 color: Colors.brown,
        //               ),)
        //           ],
        //         ),
        //
        //       ),
        //       Container(
        //         alignment: Alignment.centerLeft,
        //         decoration: const BoxDecoration(
        //           color: Colors.yellow,
        //         ),
        //         // width: 150,
        //         height: 150,
        //         child: Column(
        //           children: [
        //             Image.network("https://img1.baidu.com/it/u=513832603,1967830508&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1371",
        //               fit: BoxFit.cover,
        //               height: 100,
        //             ),
        //             const Text("标题2",
        //               style: TextStyle(
        //                 fontSize: 20,
        //                 color: Colors.brown,
        //               ),)
        //           ],
        //         ),
        //
        //       ),
        //       Container(
        //         alignment: Alignment.centerLeft,
        //         decoration: const BoxDecoration(
        //           color: Colors.blue,
        //         ),
        //         // width: 150,
        //         height: 150,
        //         child: Column(
        //           children: [
        //             Image.network("https://img1.baidu.com/it/u=513832603,1967830508&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1371",
        //               fit: BoxFit.cover,
        //               height: 100,
        //             ),
        //             const Text("标题3",
        //               style: TextStyle(
        //                 fontSize: 20,
        //                 color: Colors.brown,
        //               ),)
        //           ],
        //         ),
        //
        //       ),
        //
        //     ],
        //   ),
        // ),
    //     ListView(
    //       children: [
    // Container(
    //   color: Colors.blue, // 设置背景颜色
    //   child: ListTile(
    //     title: const Text('标题1'),
    //     subtitle: const Text('这是副标题2'),
    //     leading: const Icon(Icons.account_circle),
    //     trailing: const Icon(Icons.keyboard_arrow_right),
    //     onTap: () {
    //       // 处理点击事件
    //     },
    //   ),
    // ),
    //
    //       ],
    //     ),
        const Divider(),
        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045510596-2026591545.png",),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),

        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045525777-1050348584.png"),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),

        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045510596-2026591545.png"),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045525777-1050348584.png"),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045510596-2026591545.png"),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),
        ListTile(
          leading: Image.network("https://img2024.cnblogs.com/blog/2666697/202403/2666697-20240308045525777-1050348584.png"),
          title:const Text("FlutterFlutterFlutterFlutterFlutterFlutterFlutter"),
          subtitle: const Text("datadatadatadatadatadatadatadatadatadata"),
        ),
        const Divider(),

        const ListTile(
          leading: Icon(Icons.cabin_rounded,color: Colors.red,size: 50,),
          title: Text('Title'),
          subtitle:Text('Subtitle'),
          trailing: Icon(Icons.chevron_right_outlined,color: Colors.red,size: 50,),
        ),

        const Divider(),
        Container(
          alignment: Alignment.center,
          decoration: const BoxDecoration(
            color: Colors.white,
          ),
          // width: 150,
          height: 150,
          child: Column(
            children: [
              Image.network("https://img1.baidu.com/it/u=513832603,1967830508&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1371",
                fit: BoxFit.cover,
                height: 100,
              ),
              const Text("这是一个标题",
              style: TextStyle(
                fontSize: 20,
                color: Colors.brown,
              ),)
            ],
          ),

        ),

        const Divider(),
        Container(
          alignment: Alignment.centerLeft,
          decoration: const BoxDecoration(
            color: Colors.white,
          ),
          // width: 150,
          height: 150,
          child: Column(
            children: [
              Image.network("https://img1.baidu.com/it/u=513832603,1967830508&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1371",
                fit: BoxFit.cover,
                height: 100,
              ),
              const Text("这是一个标题",
                style: TextStyle(
                  fontSize: 20,
                  color: Colors.brown,
                ),)
            ],
          ),

        ),

        const Divider(),
        // ListTile(
        //   leading: SizedBox(
        //     width: 100,
        //     height: 100,
        //     child: Image.network("https://img2.baidu.com/it/u=1693043913,392269496&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=1042",
        //     fit: BoxFit.cover,),
        //   ),
        //   title: const Text("这是一个列表"),),
        // const Divider(),

      ],
    );
  }
}

